﻿using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;

namespace FriendFunny
{
    /// <summary>
    /// 应用全局类
    /// </summary>
    public static class GlobalApp
    {
        /// <summary>
        /// 获取Web主机环境
        /// </summary>
        public static IWebHostEnvironment WebHostEnvironment;

        /// <summary>
        /// 配置服务类
        /// </summary>
        /// <param name="builder"></param>
        public static void ConfigureServices(IWebHostBuilder builder) 
        {
            builder.ConfigureAppConfiguration((hostContext, configurationBuilder) =>
            {
                WebHostEnvironment = hostContext.HostingEnvironment;
            });
        }
    }
}
